<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<%@ taglib uri="/WEB-INF/hexacta.tld" prefix="hexacta"%>

<head>
<sx:head cache="true" />
<link rel="stylesheet" href="/hrs-intranet/styles/errortag.css"
	type="text/css" />
<link rel="stylesheet" href="/hrs-intranet/styles/TabContainerLocal.css"
	type="text/css" />
<link rel="stylesheet" href="/hrs-intranet/styles/displaytag.css"
	type="text/css" />
<link rel="stylesheet" type="text/css"
	href="/hrs-intranet/styles/jsgantt.css" />
</head>

<script type="text/javascript">
</script>

<s:actionerror />

<s:form cssClass="formClass">
<table width="70%">
	<tr>
		<td width="50%" align="left"><table><tr><td><s:textfield cssClass="tdLabel" name="periodId" label="Period"  readonly="true" theme="xhtml"/></td></tr></table></td>
	</tr>
	<tr>
 		<td width="35%" align="left"><table><tr><td><sx:autocompleter list="allMentorsList" listValue="person.name"
		searchType="startstring" listKey="id" showDownArrow="false"
		keyName="selectedMentorId"
		name="selectedMentorName" label="Mentor" resultsLimit="-1" /></td></tr></table></td>
		<td width="35%" align="left"><table><tr><td><s:submit action="MentorsHistoricReportAction_filter" key="Filter" cssClass="btn" id="okbtn" style="text-align: center"/></td></tr></table></td>
	</tr>
</table>

<s:if test="%{showReturn}">
	<s:a href="FeedbackPeriodsAction" cssClass="Add" cssStyle="position:relative; left:1000px;">Go to Manage Feedback Periods</s:a>
</s:if>

  		<s:iterator value="mentorsReportList" status="mentorsReportList">
		<table class="formClass" width="100%">
  			<tr class="trClass">
			    <td class="tdLabel" width="40%" >
					<label class="label"><b>Evaluated: </b><span id="spanEvaluated"><s:property value="feedbackPeriod.employee.person.name"/></span></label>
				</td>
			 </tr>
			 <tr>
				 <td class="tdLabel" width="40%">
					<label class="label"><b>Role: </b><span id="spanEvaluated"><s:property value="feedbackPeriod.actualBand.description"/></span></label>
				</td>
			</tr>
			<tr>
				<td>
					<s:if test="feedbackPeriod.actualPosition > 64">
						<label class="label" style="color: #208282;"><b>Band: </b><s:property value="feedbackPeriod.actualPosition"/>%</label>
					</s:if>
					<s:else>
						<label class="label"><b>Band: </b><s:property value="feedbackPeriod.actualPosition"/>%</label>
					</s:else>
				</td>
			</tr>
			<s:if test="feedbackPeriod.selfevaluation != null">
			<tr>
				<td class="tdLabel" width="40%">
					<s:url var="aevalUrl"
						action="MentorsReportAction_downloadAutoevaluation">
					<s:param name="feedbackId" value="feedbackPeriod.id"/>
					</s:url>
					<s:a cssClass="Add" href="%{aevalUrl}" style="text-align: center">Download Self-evaluation</s:a>
				</td>
			</tr>
			</s:if>
			<tr>
				<td>	  
					<s:iterator value="feedbackMentorSkill" status="feedbacks"> 
    					<table width="100%" class="listable" cellpadding="0" cellspacing="0" > 
    					<thead>
   						<tr class="trClass">
   							<td width="30%"	colspan="2">&nbsp;</td>
   							<td class="even" width="70%" colspan="2" style="text-align: center;"><label class="label"><b><span id="spanSkillType"><s:property value="feedbackSkillType"/></span></b></label></td>
						</tr>
						<tr>
							<th class="tdLabel" width="15%"><label class="label" ><b>Evaluator</b></label></th>
                			<th class="tdLabel" width="15%"><label class="label" ><b>Project </b></label></th>
                			<th class="tdLabel" width="35%"><label class="label" >Pros</label></th>
                			<th class="tdLabel" width="35%"><label class="label" >Cons</label></th>
						</tr>	
						</thead>
            			<tr>
            				<td class="tdLabel">
								<s:iterator value="feedbackMentorsProsAndCons" status="skills">
                		 			<tr class="even">
                		 				<td width="15%"><label class="label" ><s:property value="evaluator.person.name"/></label></td>
                						<td width="15%"><label class="label" ><s:property value="project"/></label></td>
                						<td width="35%"><label class="label" style="white-space: pre-wrap;"><s:property value="pro"/></label></td>
                						<td width="35%"><label class="label" style="white-space: pre-wrap;"><s:property value="con"/></label></td>
                					</tr>
                				</s:iterator>
                			</td>
						</tr>
					
						</table> 
					</s:iterator>
				</td>
			</tr>
			<tr>
				<td>
					<table class="listable" width="100%" cellpadding="0" cellspacing="0" >
						<thead>
						<tr class="trClass">
							<th class="tdLabel" width="15%"><label class="label" ><b>Evaluator</b></label></th>
							<th class="tdLabel" width="15%"><label class="label" ><b>Project</b></label></th>
							<th class="tdLabel" width="15%"><label class="label"><b>Score</b></label></th>
							<th class="tdLabel" width="40%" colspan="2"><label class="label" ><b>Effort</b></label></th>
           				</tr>
           				</thead>
						<tr>
							<td>
							 	<s:iterator value="feedbackMentorEffortScore" status="efforts">		 	
								<tr class="even">
									<td width="15%"><label class="label" ><span><s:property value="evaluator.person.name"/></span></label></td>
									<td width="15%"><label class="label" ><span><s:property value="project"/></span></label></td>
									<td width="15%"><label class="label" ><span><s:property value="scoreType"/></span></label></td>
									<td width="15%"><label class="label" ><span><s:property value="effort.scoreType"/></span></label></td>
									<td width="40%"><label class="label" style="white-space: pre-wrap;"><span><s:property value="effort.justification"/></span></label></td>               			
								</tr>
								</s:iterator>
							</td>
           				</tr>
					</table>
				</td>
			</tr>
			<tr><td>&nbsp;</td></tr>
		</table>
	</s:iterator>

<s:if test="%{mentorsReportList.size !=0 }">
	<table width="100%">
  		<tr>
  			<td width="50%" align="center"><table><s:submit action="MentorsHistoricReportAction_excelStream" key="Export" cssClass="btn" id="okbtn" style="text-align: center"/></table></td>
  		</tr>
	</table>
</s:if>
</s:form>